package com.syw.houmao.main.main.view;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.RecyclerView;
import android.widget.ListView;

import com.syw.houmao.R;
import com.syw.houmao.main.adapter.MainListAdapter;
import com.syw.houmao.main.bean.FirstPagerCategory;
import com.syw.houmao.main.bean.Hot;
import com.syw.houmao.main.main.presenter.RefreshPresenter;

public class MainActivity extends AppCompatActivity implements IShowView{


    private ListView mLv;
    private MainListAdapter adapter;
    private RefreshPresenter presenter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        RecyclerView mRecycler = new RecyclerView(this.getApplicationContext());
        mLv = (ListView) findViewById(R.id.main_lv);
        presenter = new RefreshPresenter(this);
        adapter = new MainListAdapter(this);
        presenter.bindData();
    }

    @Override
    public void setHot(Hot hot) {

    }

    @Override
    public void setFirstPagerCategory(FirstPagerCategory category) {
        adapter.setCategory(category);
    }

    @Override
    public void swapHot(Hot hot) {

    }

    @Override
    public void swapFirstPagerCategory(FirstPagerCategory category) {
        adapter.swapCategory(category);
    }

    @Override
    public void PulltoRefresh() {

    }
}

